//
//  TempCity.m
//  07-Homework
//
//  Created by Snow on 16/7/12.
//  Copyright © 2016年 Snow. All rights reserved.
//

#import "TempCity.h"

@implementation TempCity
- (void)dealloc
{
    [_cityName release];
    [_cityNumber release];
    [super dealloc];
}
- (instancetype)initWithName:(NSString *)cityName number:(NSString *)cityNumber
{
    self = [super init];
    if (self) {
        _cityName = cityName;
        _cityNumber = cityNumber;
    }
    return self;
}
- (void)setCityName:(NSString *)cityName
{
    if (_cityName != cityName) {
        [_cityName release];
        _cityName = [cityName retain];
    }
}
- (void)setCityNumber:(NSString *)cityNumber
{
    if (_cityNumber != cityNumber) {
        [_cityNumber release];
        _cityNumber = [cityNumber retain];
    }
}
- (NSString *)description
{
    return [NSString stringWithFormat:@"%@ : %@", _cityName, _cityNumber];
}
@end
